<?php

namespace app\data\controller;
use think\admin\Controller;
/**
 * 设置管理
 * @class Setting
 * @package app\data\controller
 */
class Setting extends Controller
{
    /**
     * 设置管理
     * @auth true
     * @menu true
     * @throws \think\admin\Exception
     */
    public function index()
    {
        $this->_applyFormToken();
        if ($this->request->isGet()) {
            $this->title = '平台参数配置';
            $this->fetch();
        } else {
            foreach ($this->request->post() as $k => $v) {
                sysconf($k, $v);
            }
            $this->success('修改成功！', admuri('', ['uniqid' => uniqid()]));
        }

    }

}
